package com.fr.chart.core;

import com.fr.base.background.ColorBackground;
import com.fr.base.xml.BaseXMLUtils;
import com.fr.base.xml.XMLObject;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import com.fr.chart.Chart;
import com.fr.chart.ChartCollection;
import com.fr.chart.Title;
import com.fr.chart.axis.CategoryAxis;
import com.fr.chart.axis.DataLabelInfo;
import com.fr.chart.axis.SeriesAttrBackground;
import com.fr.chart.axis.SeriesAttrColor;
import com.fr.chart.axis.TextAttr;
import com.fr.chart.axis.ValueAxis;
import com.fr.chart.legend.Legend;
import com.fr.chart.plot.AreaPlot;
import com.fr.chart.plot.Bar2DPlot;
import com.fr.chart.plot.Bar3DPlot;
import com.fr.chart.plot.BarPlot;
import com.fr.chart.plot.CategoryPlot;
import com.fr.chart.plot.Line3DPlot;
import com.fr.chart.plot.LinePlot;
import com.fr.chart.plot.Pie3DPlot;
import com.fr.chart.plot.PiePlot;
import com.fr.chart.plot.Plot;
import com.fr.chart.plot.RadarPlot;
import com.fr.chart.plot.SeriesAttr;
import com.fr.chart.plot.SeriesCollection;
import com.fr.chart.plot.StockPlot;
import com.fr.chart.plot.XYScatterPlot;
import com.fr.data.TableData;
import com.fr.data.core.DataUtils;
import com.fr.data.core.define.ChartDataDefinition;
import com.fr.data.core.define.ChartSummaryColumn;
import com.fr.data.core.define.FilterDefinition;
import com.fr.data.core.define.MoreNameCDDefinition;
import com.fr.data.core.define.OneValueCDDefinition;
import com.fr.data.core.define.ReportDataDefinition;
import com.fr.data.core.define.SortColumn;
import com.fr.data.core.define.TopDefinition;
import com.fr.data.util.function.NoneFunction;
import com.fr.report.io.xml.ReportXMLUtils;
import java.awt.Color;

public abstract class ChartXMLCompatibleUtils
{
  public static final String CHART_DESCRIPTOR_XML_TAG = "ChartDescriptor";

  public static ChartCollection read62ChartCollection(XMLableReader paramXMLableReader)
  {
    ChartCollection localChartCollection = new ChartCollection();
    Chart localChart = new Chart();
    localChartCollection.addChart(localChart);
    paramXMLableReader.readXMLObject(new XMLObject(null, localChartCollection, localChart)
    {
      private final ChartCollection val$cc;
      private final Chart val$chart;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
          return;
        if (paramXMLableReader.isChildNode())
        {
          String str = paramXMLableReader.getTagName();
          if (str.endsWith("DataDefinition"))
          {
            if (str.equals("ChartDataDefinition"))
              this.val$cc.setFilterDefinition(ChartXMLCompatibleUtils.read62ChartDataDefinition(paramXMLableReader));
            else if (str.equals("ReportDataDefinition"))
              this.val$cc.setFilterDefinition(ChartXMLCompatibleUtils.read62ReportDataDefinition(paramXMLableReader));
          }
          else
          {
            Object localObject;
            if (str.equals("Top"))
            {
              if ((localObject = paramXMLableReader.getAttr("top")) != null)
              {
                FilterDefinition localFilterDefinition = this.val$cc.getFilterDefinition();
                if (localFilterDefinition instanceof TopDefinition)
                {
                  ((TopDefinition)localFilterDefinition).setTopCate(Integer.valueOf((String)localObject).intValue());
                  ((TopDefinition)localFilterDefinition).setTopValue(Integer.valueOf((String)localObject).intValue());
                }
              }
            }
            else if (str.equals("Background"))
            {
              this.val$chart.setBackground(BaseXMLUtils.readBackground(paramXMLableReader));
            }
            else if (str.equals("Title"))
            {
              localObject = ChartXMLCompatibleUtils.read62Title(paramXMLableReader);
              this.val$chart.setTitle((Title)localObject);
            }
            else if (str.equals("Legend"))
            {
              localObject = ChartXMLCompatibleUtils.read62Legend(paramXMLableReader);
              if (this.val$chart.getPlot() != null)
                this.val$chart.getPlot().setLegend((Legend)localObject);
            }
            else if (str.equals("ChartDescriptor"))
            {
              ChartXMLCompatibleUtils.read62ChartDescriptor(this.val$chart, paramXMLableReader);
            }
            else if (str.equals("Border"))
            {
              if ((localObject = paramXMLableReader.getAttr("style")) != null)
                this.val$chart.setBorderStyle(Integer.parseInt((String)localObject));
              if ((localObject = paramXMLableReader.getAttr("color")) != null)
                this.val$chart.setBorderColor(new Color(Integer.parseInt((String)localObject), true));
            }
          }
        }
      }
    });
    return localChartCollection;
  }

  protected static FilterDefinition read62ChartDataDefinition(XMLableReader paramXMLableReader)
  {
    Object localObject;
    ChartDataDefinition localChartDataDefinition = (ChartDataDefinition)paramXMLableReader.readXMLObject(new ChartDataDefinition());
    TableData localTableData = localChartDataDefinition.getTableData();
    SortColumn[] arrayOfSortColumn = localChartDataDefinition.getOnChangeColumnArray();
    ChartSummaryColumn[] arrayOfChartSummaryColumn1 = localChartDataDefinition.getChartSummaryColumnArray();
    if (arrayOfSortColumn.length == 1)
    {
      localObject = new MoreNameCDDefinition();
      if (localTableData != null)
        ((MoreNameCDDefinition)localObject).setTableData(localTableData);
      if ((arrayOfSortColumn != null) && (arrayOfSortColumn[0] != null))
        ((MoreNameCDDefinition)localObject).setCategoryName(arrayOfSortColumn[0].getName());
      if (arrayOfChartSummaryColumn1 != null)
      {
        ChartSummaryColumn[] arrayOfChartSummaryColumn2 = arrayOfChartSummaryColumn1;
        for (int i = 0; i < arrayOfChartSummaryColumn2.length; ++i)
        {
          ChartSummaryColumn localChartSummaryColumn = arrayOfChartSummaryColumn2[i];
          if (localChartSummaryColumn.getFunction() instanceof NoneFunction)
          {
            localChartSummaryColumn.setCustomName(localChartSummaryColumn.getName());
          }
          else
          {
            String str = DataUtils.getFunctionDisplayName(localChartSummaryColumn.getFunction());
            localChartSummaryColumn.setCustomName(str + "[" + localChartSummaryColumn.getName() + "]");
          }
        }
        ((MoreNameCDDefinition)localObject).setChartSummaryColumn(arrayOfChartSummaryColumn2);
      }
      return localObject;
    }
    if (arrayOfSortColumn.length == 2)
    {
      localObject = new OneValueCDDefinition();
      if (localTableData != null)
        ((OneValueCDDefinition)localObject).setTableData(localTableData);
      if (arrayOfSortColumn != null)
      {
        if (arrayOfSortColumn[0] != null)
          ((OneValueCDDefinition)localObject).setCategoryName(arrayOfSortColumn[0].getName());
        if (arrayOfSortColumn[1] != null)
          ((OneValueCDDefinition)localObject).setSeriesColumnName(arrayOfSortColumn[1].getName());
      }
      if ((arrayOfChartSummaryColumn1 != null) && (arrayOfChartSummaryColumn1[0] != null))
      {
        ((OneValueCDDefinition)localObject).setValueColumnName(arrayOfChartSummaryColumn1[0].getName());
        ((OneValueCDDefinition)localObject).setDataFunction(arrayOfChartSummaryColumn1[0].getFunction());
      }
      return localObject;
    }
    return ((FilterDefinition)new OneValueCDDefinition());
  }

  protected static ReportDataDefinition read62ReportDataDefinition(XMLableReader paramXMLableReader)
  {
    ReportDataDefinition localReportDataDefinition = new ReportDataDefinition();
    paramXMLableReader.readXMLObject(localReportDataDefinition);
    localReportDataDefinition.setBaseOnDataValueArea(true);
    return localReportDataDefinition;
  }

  protected static Title read62Title(XMLableReader paramXMLableReader)
  {
    Title localTitle = new Title();
    paramXMLableReader.readXMLObject(new XMLReadable(localTitle)
    {
      private final Title val$title;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
          return;
        if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if (str1.equals("Text"))
          {
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.3(this));
          }
          else if (str1.equals("TextAttributes"))
          {
            String str2;
            if (paramXMLableReader.isAttr())
            {
              if ((str2 = paramXMLableReader.getAttr("isVerticalText")) != null)
                this.val$title.getTextAttr().setAlignText(Byte.parseByte(str2));
              if ((str2 = paramXMLableReader.getAttr("textDirection")) != null)
                this.val$title.getTextAttr().setDirection(Integer.parseInt(str2));
              if ((str2 = paramXMLableReader.getAttr("rotation")) != null)
                this.val$title.getTextAttr().setRotation(Integer.parseInt(str2));
            }
            else if (paramXMLableReader.isChildNode())
            {
              String str3 = paramXMLableReader.getTagName();
              if ("Border".equals(str3))
              {
                if ((str2 = paramXMLableReader.getAttr("style")) != null)
                  this.val$title.setBorderStyle(Integer.parseInt(str2));
                if ((str2 = paramXMLableReader.getAttr("color")) != null)
                  this.val$title.setBorderColor(new Color(Integer.parseInt(str2), true));
              }
              else if ("Background".equals(str3))
              {
                this.val$title.setBackground(BaseXMLUtils.readBackground(paramXMLableReader));
              }
              else if (BaseXMLUtils.isFRFontTagName(str3))
              {
                this.val$title.getTextAttr().setFRFont(BaseXMLUtils.readFRFont(paramXMLableReader));
              }
            }
          }
        }
      }

      static Title access$000(2 param2)
      {
        return param2.val$title;
      }
    });
    return localTitle;
  }

  protected static Legend read62Legend(XMLableReader paramXMLableReader)
  {
    Legend localLegend = new Legend();
    paramXMLableReader.readXMLObject(new XMLReadable(localLegend)
    {
      private final Legend val$legend;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
          return;
        if (paramXMLableReader.isChildNode())
        {
          String str;
          if ((str = paramXMLableReader.getAttr("isVisible")) != null);
          if ((str = paramXMLableReader.getAttr("position")) != null)
            this.val$legend.setPosition(Integer.parseInt(str));
          if ((str = paramXMLableReader.getAttr("legendNum")) != null)
          {
            int i = -1;
            try
            {
              int j = Integer.parseInt(str);
              i = (j >= 0) ? j : -1;
            }
            catch (NumberFormatException localNumberFormatException)
            {
            }
            this.val$legend.setMaxShowLegendNumber(i);
          }
          if ((str = paramXMLableReader.getAttr("iconBorderColor")) != null)
            this.val$legend.setBorderColor(new Color(Integer.parseInt(str), true));
        }
      }
    });
    return localLegend;
  }

  protected static void read62ChartDescriptor(Chart paramChart, XMLableReader paramXMLableReader)
  {
    paramXMLableReader.readXMLObject(new XMLReadable(paramChart)
    {
      private final Chart val$chart;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if (str1.equals("HotHyperlink"))
          {
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.6(this));
          }
          else
          {
            Object localObject;
            if ("Style".equals(str1))
            {
              localObject = ChartXMLCompatibleUtils.read62ChartStyle(paramXMLableReader);
              this.val$chart.setPlot((Plot)localObject);
            }
            else if (("Color".equals(str1)) && (this.val$chart.getPlot() != null))
            {
              String str2;
              localObject = null;
              if ((str2 = paramXMLableReader.getAttr("color")) != null)
                localObject = new Color(Integer.parseInt(str2), true);
              int i = -1;
              if ((str2 = paramXMLableReader.getAttr("index")) != null)
                i = Integer.parseInt(str2);
              if ((localObject != null) && (i != -1))
              {
                SeriesAttr localSeriesAttr = this.val$chart.getPlot().getSeriesCollection().getSeriesAttr(i);
                SeriesAttrColor localSeriesAttrColor = (SeriesAttrColor)localSeriesAttr.isContains(new SeriesAttrColor());
                if (localSeriesAttrColor == null)
                {
                  localSeriesAttrColor = new SeriesAttrColor();
                  localSeriesAttr.addCondition(localSeriesAttrColor);
                }
                localSeriesAttrColor.setSeriesColor((Color)localObject);
                SeriesAttrBackground localSeriesAttrBackground = (SeriesAttrBackground)localSeriesAttr.isContains(new SeriesAttrBackground());
                if (localSeriesAttrBackground == null)
                {
                  localSeriesAttrBackground = new SeriesAttrBackground();
                  localSeriesAttr.addCondition(localSeriesAttrBackground);
                }
                localSeriesAttrBackground.setSeriesBackground(ColorBackground.getInstance((Color)localObject));
              }
            }
          }
        }
      }

      static Chart access$100(5 param5)
      {
        return param5.val$chart;
      }
    });
  }

  protected static Plot read62ChartStyle(XMLableReader paramXMLableReader)
  {
    String str;
    Object localObject = null;
    if ((str = paramXMLableReader.getAttr("class")) != null)
      if ((str.equals("com.fr.chart.style.BarStyle")) || (str.equals("com.fr.chart.style.BarChartStyle")))
      {
        localObject = read62BarChartStyle(paramXMLableReader);
      }
      else if ((str.equals("com.fr.chart.style.HBarStyle")) || (str.equals("com.fr.chart.style.HBarChartStyle")))
      {
        BarPlot localBarPlot = read62BarChartStyle(paramXMLableReader);
        localBarPlot.setIsHorizontal(false);
        localObject = localBarPlot;
      }
      else if ((str.equals("com.fr.chart.style.LineStyle")) || (str.equals("com.fr.chart.style.LineChartStyle")))
      {
        localObject = read62LineChartStyle(paramXMLableReader);
      }
      else if ((str.equals("com.fr.chart.style.AreaStyle")) || (str.equals("com.fr.chart.style.AreaChartStyle")))
      {
        localObject = read62AreaChartStyle(paramXMLableReader);
      }
      else if ((str.equals("com.fr.chart.style.PieStyle")) || (str.equals("com.fr.chart.style.PieChartStyle")))
      {
        localObject = read62PieChartStyle(paramXMLableReader);
      }
      else if ((str.equals("com.fr.chart.style.XYScatterStyle")) || (str.equals("com.fr.chart.style.XYScatterChartStyle")))
      {
        localObject = read62XYScatterChartStyle(paramXMLableReader);
      }
      else if ((str.equals("com.fr.chart.style.RadarStyle")) || (str.equals("com.fr.chart.style.RadarChartStyle")))
      {
        localObject = new RadarPlot();
      }
      else if ((str.equals("com.fr.chart.style.StockStyle")) || (str.equals("com.fr.chart.style.StockChartStyle")))
      {
        localObject = new StockPlot();
      }
    if (localObject == null)
      localObject = new Bar2DPlot();
    return ((Plot)localObject);
  }

  protected static BarPlot read62BarChartStyle(XMLableReader paramXMLableReader)
  {
    7 local7 = new XMLObject(null)
    {
      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
        {
          this.obj = new Bar2DPlot();
          ((BarPlot)this.obj).setIsHorizontal(true);
        }
        else if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if ("BarStyle".equals(str1))
          {
            String str2;
            if (((str2 = paramXMLableReader.getAttr("is3D")) != null) && (Boolean.valueOf(str2).booleanValue()))
            {
              this.obj = new Bar3DPlot();
              ((BarPlot)this.obj).setIsHorizontal(true);
            }
            if ((str2 = paramXMLableReader.getAttr("isDrawBorder")) != null)
              ((BarPlot)this.obj).setBorderStyle(1);
            if ((str2 = paramXMLableReader.getAttr("borderLineColor")) != null)
              ((BarPlot)this.obj).setBorderColor(new Color(Integer.parseInt(str2), true));
            if (((str2 = paramXMLableReader.getAttr("isCubic3D")) != null) && (this.obj instanceof Bar3DPlot))
              ((Bar3DPlot)this.obj).setIsCubic3D(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("isTransparency")) != null)
              ((BarPlot)this.obj).setAlpha(0.5F);
            if (((str2 = paramXMLableReader.getAttr("isCascade")) != null) && (this.obj instanceof Bar3DPlot))
              ((Bar3DPlot)this.obj).setIsCascade(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("barSpacePecent")) != null)
              ((BarPlot)this.obj).setCategoryIntervalPercent(Double.valueOf(str2).doubleValue());
            if ((str2 = paramXMLableReader.getAttr("offSetPecent")) != null);
          }
          else
          {
            ChartXMLCompatibleUtils.read62CategoryChartStyle((CategoryPlot)this.obj, paramXMLableReader);
          }
        }
      }
    };
    paramXMLableReader.readXMLObject(local7);
    return ((BarPlot)local7.getObject());
  }

  protected static Plot read62LineChartStyle(XMLableReader paramXMLableReader)
  {
    8 local8 = new XMLObject(null)
    {
      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
        {
          this.obj = new LinePlot();
        }
        else if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if ("LineStyle".equals(str1))
          {
            String str2;
            if (((str2 = paramXMLableReader.getAttr("is3D")) != null) && (Boolean.valueOf(str2).booleanValue()))
              this.obj = new Line3DPlot();
            if (((str2 = paramXMLableReader.getAttr("isShowLine")) != null) && (this.obj instanceof LinePlot))
              ((LinePlot)this.obj).setIsShowLine(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("isShowHotMap")) != null);
            if ((str2 = paramXMLableReader.getAttr("lineStroke")) != null);
            if (((str2 = paramXMLableReader.getAttr("isShowMarker")) != null) && (this.obj instanceof LinePlot))
              ((LinePlot)this.obj).setIsShowMarker(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("markerSize")) != null);
            if ((str2 = paramXMLableReader.getAttr("startFromZero")) != null);
          }
          else
          {
            ChartXMLCompatibleUtils.read62CategoryChartStyle((CategoryPlot)this.obj, paramXMLableReader);
          }
        }
      }
    };
    paramXMLableReader.readXMLObject(local8);
    return ((Plot)local8.getObject());
  }

  protected static Plot read62AreaChartStyle(XMLableReader paramXMLableReader)
  {
    9 local9 = new XMLObject(null)
    {
      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
        {
          this.obj = new AreaPlot();
        }
        else if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if ("AreaStyle".equals(str1))
          {
            String str2;
            if ((str2 = paramXMLableReader.getAttr("alpha")) != null)
              ((AreaPlot)this.obj).setAlpha(Float.parseFloat(str2));
            if (((str2 = paramXMLableReader.getAttr("isDrawBorder")) != null) && (Boolean.valueOf(str2).booleanValue()))
              ((AreaPlot)this.obj).setBorderStyle(1);
            if ((str2 = paramXMLableReader.getAttr("borderLineColor")) != null)
              ((AreaPlot)this.obj).setBorderColor(new Color(Integer.parseInt(str2), true));
          }
          else
          {
            ChartXMLCompatibleUtils.read62CategoryChartStyle((CategoryPlot)this.obj, paramXMLableReader);
          }
        }
      }
    };
    paramXMLableReader.readXMLObject(local9);
    return ((Plot)local9.getObject());
  }

  protected static Plot read62XYScatterChartStyle(XMLableReader paramXMLableReader)
  {
    XYScatterPlot localXYScatterPlot = new XYScatterPlot();
    paramXMLableReader.readXMLObject(new XMLReadable(localXYScatterPlot)
    {
      private final XYScatterPlot val$xyScatterPlot;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if ("Values".equals(str1))
          {
            ChartXMLCompatibleUtils.read62AbstractChartStyle(this.val$xyScatterPlot, paramXMLableReader);
          }
          else if ("Plot".equals(str1))
          {
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.11(this));
          }
          else if ("XYScatterStyle".equals(str1))
          {
            String str2;
            if ((str2 = paramXMLableReader.getAttr("isShowLine")) != null)
              this.val$xyScatterPlot.setShowLine(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("isShowMarker")) != null)
              this.val$xyScatterPlot.setShowMarker(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("markerSize")) != null);
          }
        }
      }

      static XYScatterPlot access$200(10 param10)
      {
        return param10.val$xyScatterPlot;
      }
    });
    return localXYScatterPlot;
  }

  protected static Plot read62RadarChartStyle(XMLableReader paramXMLableReader)
  {
    RadarPlot localRadarPlot = new RadarPlot();
    paramXMLableReader.readXMLObject(new XMLReadable(localRadarPlot)
    {
      private final RadarPlot val$radarPlot;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str1 = paramXMLableReader.getTagName();
          if ("Values".equals(str1))
          {
            ChartXMLCompatibleUtils.read62AbstractChartStyle(this.val$radarPlot, paramXMLableReader);
          }
          else if ("Plot".equals(str1))
          {
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.13(this));
          }
          else if ("RadarStyle".equals(str1))
          {
            String str2;
            if ((str2 = paramXMLableReader.getAttr("isFilled")) != null)
              this.val$radarPlot.setIsFilled(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("alpha")) != null)
              this.val$radarPlot.setAlpha(Float.parseFloat(str2));
            if ((str2 = paramXMLableReader.getAttr("isShowLine")) != null)
              this.val$radarPlot.setShowLine(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("isShowMarker")) != null)
              this.val$radarPlot.setShowMarker(Boolean.valueOf(str2).booleanValue());
            if ((str2 = paramXMLableReader.getAttr("markerSize")) != null);
          }
        }
      }

      static RadarPlot access$300(12 param12)
      {
        return param12.val$radarPlot;
      }
    });
    return localRadarPlot;
  }

  protected static Plot read62PieChartStyle(XMLableReader paramXMLableReader)
  {
    DataLabelInfo localDataLabelInfo = new DataLabelInfo();
    14 local14 = new XMLObject(null, localDataLabelInfo)
    {
      private final DataLabelInfo val$dataLabelInfo;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isAttr())
        {
          this.obj = new PiePlot();
        }
        else if (paramXMLableReader.isChildNode())
        {
          Object localObject;
          String str1 = paramXMLableReader.getTagName();
          if ("PieStyle".equals(str1))
          {
            if (((localObject = paramXMLableReader.getAttr("is3D")) != null) && (Boolean.valueOf((String)localObject).booleanValue()))
              this.obj = new Pie3DPlot();
            if (((localObject = paramXMLableReader.getAttr("isShowPercentages")) != null) && (Boolean.valueOf((String)localObject).booleanValue()))
            {
              String str2 = this.val$dataLabelInfo.getSeriesLabel();
              if (str2 != null)
                str2 = str2 + "${PERCENT}";
              else
                str2 = "${PERCENT}";
            }
            if (((localObject = paramXMLableReader.getAttr("isDrawBorder")) != null) && (Boolean.valueOf((String)localObject).booleanValue()))
              ((PiePlot)this.obj).setBorderStyle(1);
            if ((localObject = paramXMLableReader.getAttr("borderLineColor")) != null)
              ((BarPlot)this.obj).setBorderColor(new Color(Integer.parseInt((String)localObject), true));
          }
          else if ("Plot".equals(str1))
          {
            localObject = (PiePlot)this.obj;
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.15(this, (PiePlot)localObject));
          }
          else
          {
            ChartXMLCompatibleUtils.read62AbstractChartStyle((Plot)this.obj, paramXMLableReader);
          }
        }
      }
    };
    paramXMLableReader.readXMLObject(local14);
    PiePlot localPiePlot = (PiePlot)local14.getObject();
    localDataLabelInfo.add2SeriesAttr(localPiePlot.getSeriesCollection().getDefaultSeriesAttr());
    return localPiePlot;
  }

  protected static void read62CategoryChartStyle(CategoryPlot paramCategoryPlot, XMLableReader paramXMLableReader)
  {
    String str1 = paramXMLableReader.getTagName();
    if ("Values".equals(str1))
    {
      read62AbstractChartStyle(paramCategoryPlot, paramXMLableReader);
    }
    else if ("Plot".equals(str1))
    {
      paramXMLableReader.readXMLObject(new XMLReadable(paramCategoryPlot)
      {
        private final CategoryPlot val$categoryPlot;

        public void readXML(XMLableReader paramXMLableReader)
        {
          if (paramXMLableReader.isChildNode())
          {
            String str1 = paramXMLableReader.getTagName();
            String str2 = null;
            if ("Border".equals(str1))
            {
              if ((str2 = paramXMLableReader.getAttr("style")) != null)
                this.val$categoryPlot.setBorderStyle(Integer.parseInt(str2));
              if ((str2 = paramXMLableReader.getAttr("color")) != null)
                this.val$categoryPlot.setBorderColor(new Color(Integer.parseInt(str2), true));
            }
            else if ("Background".equals(str1))
            {
              this.val$categoryPlot.setBackground(BaseXMLUtils.readBackground(paramXMLableReader));
            }
            else if ("GridLine".equals(str1))
            {
              if ((str2 = paramXMLableReader.getAttr("style")) != null)
              {
                this.val$categoryPlot.getCategoryAxis().setMainGridStyle(Integer.parseInt(str2));
                this.val$categoryPlot.getValueAxis().setMainGridStyle(Integer.parseInt(str2));
              }
              if ((str2 = paramXMLableReader.getAttr("color")) != null)
              {
                this.val$categoryPlot.getCategoryAxis().setMainGridColor(new Color(Integer.parseInt(str2), true));
                this.val$categoryPlot.getValueAxis().setMainGridColor(new Color(Integer.parseInt(str2), true));
              }
            }
          }
        }
      });
    }
    else if ("CategoryStyle".equals(str1))
    {
      String str2;
      if ((str2 = paramXMLableReader.getAttr("isStacked")) != null)
        paramCategoryPlot.setIsStacked(Boolean.valueOf(str2).booleanValue());
      if ((str2 = paramXMLableReader.getAttr("bgStagger")) != null)
        paramCategoryPlot.setBgStagger(Boolean.valueOf(str2).booleanValue());
      if (((str2 = paramXMLableReader.getAttr("isHorizontal")) != null) && (paramCategoryPlot instanceof BarPlot))
        ((BarPlot)paramCategoryPlot).setIsHorizontal(Boolean.valueOf(str2).booleanValue());
      paramXMLableReader.readXMLObject(new XMLReadable()
      {
        public void readXML(XMLableReader paramXMLableReader)
        {
          if (paramXMLableReader.isChildNode())
          {
            String str = paramXMLableReader.getAttr("class");
            if (str != null);
          }
        }
      });
    }
  }

  protected static void read62AbstractChartStyle(Plot paramPlot, XMLableReader paramXMLableReader)
  {
    DataLabelInfo localDataLabelInfo = new DataLabelInfo();
    localDataLabelInfo.add2SeriesAttr(paramPlot.getSeriesCollection().getDefaultSeriesAttr());
    paramXMLableReader.readXMLObject(new XMLReadable(localDataLabelInfo)
    {
      private final DataLabelInfo val$dataLabelInfo;

      public void readXML(XMLableReader paramXMLableReader)
      {
        String str1;
        if (paramXMLableReader.isAttr())
          if (((str1 = paramXMLableReader.getAttr("isShowValues")) != null) && (Boolean.valueOf(str1).booleanValue()))
          {
            String str2 = this.val$dataLabelInfo.getSeriesLabel();
            if (str2 != null)
              str2 = str2 + "${VALUE}";
            else
              str2 = "${VALUE}";
          }
        else if (paramXMLableReader.isChildNode())
          if ("Format".equals(paramXMLableReader.getTagName()))
          {
            this.val$dataLabelInfo.setFormat(ReportXMLUtils.readFormat(paramXMLableReader));
          }
          else if (("TextAttributes".equals(paramXMLableReader.getTagName())) && (paramXMLableReader.isAttr()))
          {
            if ((str1 = paramXMLableReader.getAttr("isVerticalText")) != null)
              this.val$dataLabelInfo.getTextAttr().setAlignText(Byte.parseByte(str1));
            if ((str1 = paramXMLableReader.getAttr("textDirection")) != null)
              this.val$dataLabelInfo.getTextAttr().setDirection(Integer.parseInt(str1));
            if ((str1 = paramXMLableReader.getAttr("rotation")) != null)
              this.val$dataLabelInfo.getTextAttr().setRotation(Integer.parseInt(str1));
          }
      }
    });
  }

  public static SeriesCollection read65DataSeriesCollection(XMLableReader paramXMLableReader, SeriesCollection paramSeriesCollection)
  {
    paramXMLableReader.readXMLObject(new XMLReadable(paramSeriesCollection)
    {
      private final SeriesCollection val$resultCollection;

      public void readXML(XMLableReader paramXMLableReader)
      {
        if (paramXMLableReader.isChildNode())
        {
          String str = paramXMLableReader.getTagName();
          if ("Default".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.20(this));
          else if ("ColorMap".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.21(this));
          else if ("LineColorMap".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.22(this));
          else if ("LineStyleMap".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.23(this));
          else if ("DataLabelMap".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.24(this));
          else if ("SeriesLineStyleMap".equals(str))
            paramXMLableReader.readXMLObject(new ChartXMLCompatibleUtils.26(this));
        }
      }

      static SeriesCollection access$400(19 param19)
      {
        return param19.val$resultCollection;
      }
    });
    return paramSeriesCollection;
  }
}